Bidirectional parsing a functional/logic perspective
نویسنده
چکیده
We introduce PURE, a pure declarative approach to implementing declarative transformations with declarative tools. This DomainSpecific Language (DSL), inspired by the Definite Clause Grammar (DCG) and Parsing Expression Grammar (PEG) formalisms, is implemented using the Revised Report on the Algorithmic Language Scheme (R5RS). Thanks to its use of the MINIKANREN logic programming system it supports fully reversible and extensible syntax-semantics relations. In this paper we highlight the usability and simplicity of PURE’s approach, address the problem of leftrecursion and show how its features help in defining custom and extensible typing systems for JavaScript Object Notation (JSON).
منابع مشابه
Constructing a Bidirectional Transformation between BPMN and BPEL with Functional-logic Graph Parser Combinators
The abstract syntax of structured Business Process Models (BPMs) can be described by a context-free hypergraph grammar in a straightforward way. Functional-logic graph parser combinators can be used to construct powerful parsers for such context-free hypergraph grammars. These parsers can be enriched with semantic computations, e.g. to synthesize BPEL from BPMN. Moreover, they are bidirectional...
متن کاملA Functional-Logic Perspective on Parsing
Parsing has been a traditional workbench for showing the virtues of declarative programming. Both logic and functional programming claim the ability of writing parsers in a natural and concise way. We address here the task from a functional-logic perspective. By modelling parsers as non-deterministic functions we achieve a very natural manner of building parsers, which combines the nicest prope...
متن کاملConstructing a bidirectional transformation between BPMN and BPEL with a functional logic programming language
In this article we show how functional logic programming techniques can be used to construct a bidirectional transformation between structured process models of the business process modeling notation (BPMN) and executable models of the business process execution language (BPEL). We specify the abstract syntax of structured process models by a context-free hypergraph grammar. This grammar can be...
متن کاملParsing with Non-Deterministic Functions
Parsing has been a traditional workbench for showing the virtues of declarative programming. Both logic and functional programming claim the ability of writing parsers in a natural and concise way. We address here the task from a functional-logic perspective. By modeling parsers as non-deterministic functions we achieve a very natural manner of building parsers, which combines the nicest proper...
متن کاملGPSG Parsing, Bidirectional Charts, and Connection Graphs
Ttfs paper describes a tractable method for parsing GPSG grmnmars without ,altering the modularity and expressiveness of this tbnnalism. The proposed method is based on a constraint propagation mech,'ufism which reduces the number of unnecessary structures built at parse thne through the early detection of inadmissible local trees. The propagation of constraints is rendered efficient by indexin...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014